home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.UserControl UserControl1
- AutoRedraw = -1 'True
- ClientHeight = 705
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 4800
- ScaleHeight = 705
- ScaleWidth = 4800
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 200
- Left = 2160
- Top = 240
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "1.2"
- Height = 255
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 855
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- BeginProperty Font
- Name = "Times New Roman"
- Size = 18
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 390
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 90
- End
- End
- Attribute VB_Name = "UserControl1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
-
- Dim m_Speed
-
- Private Sub Timer1_Timer()
- Dim i As Integer
-
- Label1.Left = Label1.Left - 2 * Screen.TwipsPerPixelX
- If (Label1.Left + Label1.Width < 0) Then
- Label1.Left = Width
- End If
- End Sub
-
- Private Sub UserControl_Initialize()
-
- Dim i As Integer
- Dim fn As Integer
- Dim str1 As String
-
- fn = FreeFile
-
- ' Open the data file.
- Open "c:\fobsax.fbs" For Input As #fn
-
- ' Skip my name (Project1.UserControl1)
- Line Input #fn, str1
-
- ' Skip line 2 (reserved for future use).
- Line Input #fn, str1
-
- ' Read the tip of the day.
- Line Input #fn, str1
-
- Close #fn
- Label1 = str1
- Label1.Left = Width
-
- GetProperties
-
- Timer1.Enabled = True
- If (IsNumeric(speed)) Then
- Timer1.Interval = Timer1.Interval / speed
- End If
-
- End Sub
-
- Property Let FontSize(newFontSize)
-
- On Error Resume Next
- Label1.FontSize = newFontSize
-
- End Property
-
- Property Get FontSize()
-
- FontSize = Label1.FontSize
-
- End Property
-
- Property Let speed(newSpeed)
-
- If (newSpeed >= 1 And newSpeed <= 4) Then
- m_Speed = newSpeed
- End If
-
- End Property
-
- Property Get speed()
-
- speed = m_Speed
-
- End Property
-
- Sub GetProperties()
-
- Dim i As Integer
- Dim str1 As String
- Dim rc As Long
-
- speed = GetPropertyFromFBS("Speed", "4")
- FontSize = GetPropertyFromFBS("FontSize", "16")
-
- End Sub
-